working out the acceleration from a curved graph